<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

Class Pluginmodel extends CI_Model
{
	function getActivePlugins()
	{
	    $this -> db -> select('*');
	    $this -> db -> from('plugin');
	    $this -> db -> where('status', 1);
	    $query = $this -> db -> get();
	    if($query -> num_rows())
	    {
		  return $query->result();
	    }
	    else
	    {
		 return false;
	    }
	}
	function getList(){
		$directories = glob(APPPATH."plugin/*" , GLOB_ONLYDIR);
		foreach($directories as $key=>$value)
		{
			$value = substr($value,"/");
			$directories[$key] = 	
		}
		return $directories;
	}
	function getPluginDescription($name){
		$lines = file(APPPATH."plugin/*".$name, FILE_IGNORE_NEW_LINES);
	}
}
?>